package com.yangzhe.okhttputils.request;

import okhttp3.Request;
import okhttp3.RequestBody;

/**
 * 杨哲  版权所有(c)
 * Author：yangzhe
 * Time: 2017/6/7 17:13
 * @version  0.1
 */
public class HeadRequest extends BaseRequest<HeadRequest> {

    public HeadRequest(String url) {
        super(url);
    }

    @Override
    public RequestBody generateRequestBody() {
        return null;
    }

    @Override
    public Request generateRequest(RequestBody requestBody) {
        Request.Builder requestBuilder = new Request.Builder();
        appendHeaders(requestBuilder);
        url = createUrlFromParams(url, params.urlParamsMap);
        return requestBuilder.head().url(url).tag(tag).build();
    }
}
